<template>
	<view>
		<view class="edgeInsetTop"></view>
		<view class="cu-list menu sm-border">
			<view class="cu-item bgz arrow" @tap="$wanlshop.auth(`/pages/user/auth/validcode?event=resetpwd&mobile=${user.mobile}`)">
				<view class="content">
					<text>修改登录密码</text>
				</view>
			</view>
			<view class="cu-item bgz arrow" @tap="noMobile">
				<view class="content">
					<text>修改手机号码</text>
				</view>
			</view>
			<view class="cu-item bgz arrow" @tap="noPay">
				<view class="content">
					<text>{{ statistics['is_pwd_method'] == 1 ? '设置' : '修改' }}支付密码</text>
				</view>
			</view>
		</view>

		<!-- <view class="cu-list menu sm-border">
			<view class="cu-item bgz arrow">
				<view class="content">
					<text>安全中心</text>
				</view>
			</view>
		</view> -->

		<view class="cu-list menu sm-border" @tap="noUser">
			<view class="cu-item bgz arrow">
				<view class="content">
					<text>注销账户</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import { mapState } from 'vuex';
export default {
	data() {
		return {};
	},
	computed: {
		...mapState(['user', 'statistics'])
	},
	methods: {
		noPay() {
			if (this.statistics.is_pwd_method == 2 && this.user.mobile == '') {
				this.$wanlshop.msg('请先绑定手机号');
				return;
			}
			this.$wanlshop.on(`/pages/user/auth/mima?type=${this.statistics.is_pwd_method}&mobile=${this.user.mobile}`);
		},
		noUser() {
			this.$wanlshop.msg('暂不支持注销账户');
		},
		noMobile() {
			this.$wanlshop.on(`/pages/user/auth/xgphone`);
		}
	}
};
</script>

<style></style>
